

function start()
	print("进入登陆界面-------")
	self:LuaBindClick("Login",Click_Login)	
end

function OnRecvLogin( result )
	local  data = decode(result).data
	print(data)
	if data.isNewplayer == 1
		then
		CS.LuaGameTool.OpenStateUI("createplayer",1)
	else
	-- body

		UserData.PlayerInfo = data
		CS.LuaGameTool.OpenStateUI("main",1)
	end
end

function OnRecvLoginError( ... )
	-- body
	print("ssss")
end

function update()
	
end

function ondestroy()
 
end

function  Click_Login( ... )
	print( UserData.PlayerInfo.uuid)
	LuaNetHelper.Login(OnRecvLogin,OnRecvLoginError)
	-- body
end